Replace _PyUnicode_AsString and PYWIN_ATTR_CONVERT with PyUnicode_AsUTF8
          #2591
        
          
      
      
        
          +65
        
        
          −72
        
        
          
        
      
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Addresses a Python C API Deprecation listed in #2588
_PyUnicode_AsStringis now just a wrapper aroundPyUnicode_AsUTF8https://github.com/python/cpython/blob/4e294f6feb3193854d23e0e8be487213a80b232f/Include/cpython/unicodeobject.h#L632-L637
PYWIN_ATTR_CONVERThasn't been a meaningful alias since 7cab372#diff-7b12f2f5988484bf0eb2709398c8e2b2ff828cad5aa35b8ed44f8942bd7438ffL94-L98 other than for making name name public. Which it now is withPyUnicode_AsUTF8.It was also hiding a cast from
char*toconst char*.